<template>
  <div class="person">
    <h2>当前求和为：{{ sum }}</h2>
    <button @click="addSum">点击加1</button>
    <hr />
    <img v-for="(dog, index) in dogList" :key="index" :src="dog" alt="" />
    <button @click="addDog">点击新增dog</button>
  </div>
</template>

<script lang="ts" setup name="Person">
import useDog from "@/hooks/useDog";
import useSum from "@/hooks/useSum";

const {sum,addSum} = useSum();
const {dogList,addDog} = useDog();

</script>

<style scoped>
.person {
  width: 100%;
  background-color: skyblue;
}
img {
  width: 100px;
}
</style>
